using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Threading;
using VBORT;

namespace OrderMachine
{
    public partial class Form1 : Form
    {

        public delegate void InsertText1(string msg);
        

        public Form1()
        {
            InitializeComponent();
            System.Windows.Forms.Control.CheckForIllegalCrossThreadCalls = false;
        }

        private void StartMonitor()
        {
            //TradeOrder to = new TradeOrder();

            VORT vt = new VORT();
            vt.Add += new VORT.AddEventHandler(vt_Add);
        }

        private void button1_Click(object sender, EventArgs e)
        {
            
        }

        void vt_Add(List<string> info)
        {
            new Thread((ThreadStart)delegate()
            {
                textBox1.AppendText(string.Join(",", info.ToArray()));
                textBox1.AppendText(Environment.NewLine);
            }).Start();
        }
    }
}